/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ejb;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Temporal;

/**
 *
 * @author Stefano
 */
@Entity
public class SponsoredEvent implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    protected String eid;
    protected String UserID;
    
    @Temporal(javax.persistence.TemporalType.DATE)
    protected Date startDate;
   
    @Temporal(javax.persistence.TemporalType.DATE)
    protected Date endDate;
    protected int maxImpression;
    protected int impression;
    protected String tag;

    /**
     * Get the value of tag
     *
     * @return the value of tag
     */
    public String getTag() {
        return tag;
    }

    /**
     * Set the value of tag
     *
     * @param tag new value of tag
     */
    public void setTag(String tag) {
        this.tag = tag;
    }

    /**
     * Get the value of UserID
     *
     * @return the value of UserID
     */
    public String getUserID() {
        return UserID;
    }
    protected String name;

    /**
     * Get the value of name
     *
     * @return the value of name
     */
    public String getName() {
        return name;
    }

    /**
     * Set the value of name
     *
     * @param name new value of name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Set the value of UserID
     *
     * @param UserID new value of UserID
     */
    public void setUserID(String UserID) {
        this.UserID = UserID;
    }

    /**
     * Get the value of impression
     *
     * @return the value of impression
     */
    public int getImpression() {
        return impression;
    }

    /**
     * Set the value of impression
     *
     * @param impression new value of impression
     */
    public void setImpression(int impression) {
        this.impression = impression;
    }
    
    /**
     * Get the value of macImpression
     *
     * @return the value of macImpression
     */
    public int getMaxImpression() {
        return maxImpression;
    }

    /**
     * Set the value of macImpression
     *
     * @param macImpression new value of macImpression
     */
    public void setMaxImpression(int macImpression) {
        this.maxImpression = macImpression;
    }

    /**
     * Get the value of endDate
     *
     * @return the value of endDate
     */
    public Date getEndDate() {
        return endDate;
    }

    /**
     * Set the value of endDate
     *
     * @param endDate new value of endDate
     */
    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    /**
     * Get the value of eid
     *
     * @return the value of eid
     */
    public String getEid() {
        return eid;
    }

    /**
     * Set the value of eid
     *
     * @param eid new value of eid
     */
    public void setEid(String eid) {
        this.eid = eid;
    }
    

    /**
     * Get the value of startDate
     *
     * @return the value of startDate
     */
    public Date getStartDate() {
        return startDate;
    }

    /**
     * Set the value of startDate
     *
     * @param startDate new value of startDate
     */
    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SponsoredEvent)) {
            return false;
        }
        SponsoredEvent other = (SponsoredEvent) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "ejb.SponsoredEvent[ id=" + id + " ]";
    }
    
}
